<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>时间</title>
		<script type="text/javascript">
			function aaa(){
			var a=new Date();
			var year=a.getFullYear();
			var month=a.getMonth()+1;
			var day=a.getDate();
			var xq=a.getDay();
			var a1=a.getHours();
			var a2=a.getMinutes();
			var a3=a.getSeconds();
			var str="";
			if(a1>12){
				a1-=12;
				str="PM";
			}else{
				str="Am";
			}
			document.getElementById("shijian").innerHTML="<h1>您好,欢迎访问贵美商城!</h1>"+" \n "+
			year+"年"+month+"月"+day+"日"+"&nbsp;"+"&nbsp;"+"&nbsp;"+a1+":"+a2+":"+a3+"&nbsp;"+"&nbsp;"+"&nbsp;"+str+"&nbsp;"+"&nbsp;"+"&nbsp;"+"星期"+xq;
			}
			var c=setInterval("aaa()",1000);
		</script>
	</head>
	<body>
		<div id="shijian">
			
		</div>
		
	</body>
</html>
